package com.carrie.mdg.myviewtext.activity;

import android.content.BroadcastReceiver;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.content.ServiceConnection;
import android.os.IBinder;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.util.Log;

import com.bumptech.glide.util.LogTime;
import com.carrie.mdg.myviewtext.R;
import com.example.blesdk.BluetoothLeService;

public class FSBLESDKTestActivity extends AppCompatActivity {
    private static final String TAG = "FSBLESDKTestActivity";
    private boolean isBindBluetoothService;

    public static void actionStart(Context context) {
        Intent intent = new Intent(context, FSBLESDKTestActivity.class);
        context.startActivity(intent);

    }

    private ServiceConnection serviceConnection = new ServiceConnection() {
        @Override
        public void onServiceConnected(ComponentName name, IBinder service) {
            Log.d(TAG, "onServiceConnected: ");
        }

        @Override
        public void onServiceDisconnected(ComponentName name) {
            Log.d(TAG, "onServiceDisconnected: ");
        }
    };

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_fsblesdktest);

        Intent serviceIntent = new Intent(this, BluetoothLeService.class);
        isBindBluetoothService = bindService(serviceIntent, serviceConnection, BIND_AUTO_CREATE);
    }

    BroadcastReceiver receiver = new BroadcastReceiver() {
        @Override
        public void onReceive(Context context, Intent intent) {

        }
    };


}
